package com.cloud.phone.task.whatsapp;

import java.io.Serializable;
import java.util.Objects;

public class ConversationItemBean implements Serializable {
    private String nickName;//发送方昵称 为空则为自己
    private String message;//文本内容
    private String updateDate;//消息发送时间
    private String placeText;//地点-地图类型才有值
    private int unReadCount;//未读消息数--列表页才有值
    private int currentMessageType;//文本、图片、图文、视频、视频+文字、地点、文件
    private int direction;//发送方向 0对方 1自己 2时间或其他消息提示
    private int imageWidth;
    private int imageHeight;
    private String imageUrl;//图片类型消息的url


    @Override
    public String toString() {
        return "ConversationItemBean{" +
                "nickName='" + nickName + '\'' +
                ", message='" + message + '\'' +
                ", updateDate='" + updateDate + '\'' +
                ", placeText='" + placeText + '\'' +
                ", unReadCount=" + unReadCount +
                ", currentMessageType=" + currentMessageType +
                ", direction=" + direction +
                ", imageWidth=" + imageWidth +
                ", imageHeight=" + imageHeight +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ConversationItemBean that = (ConversationItemBean) o;
        return unReadCount == that.unReadCount && currentMessageType == that.currentMessageType && direction == that.direction && imageWidth == that.imageWidth && imageHeight == that.imageHeight && Objects.equals(nickName, that.nickName) && Objects.equals(message, that.message) && Objects.equals(updateDate, that.updateDate) && Objects.equals(placeText, that.placeText);
    }

    @Override
    public int hashCode() {
        return Objects.hash(nickName, message, updateDate, placeText, unReadCount, currentMessageType, direction, imageWidth, imageHeight);
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public int getImageWidth() {
        return imageWidth;
    }

    public void setImageWidth(int imageWidth) {
        this.imageWidth = imageWidth;
    }

    public int getImageHeight() {
        return imageHeight;
    }

    public void setImageHeight(int imageHeight) {
        this.imageHeight = imageHeight;
    }

    public int getCurrentMessageType() {
        return currentMessageType;
    }

    public void setCurrentMessageType(int currentMessageType) {
        this.currentMessageType = currentMessageType;
    }

    public String getPlaceText() {
        return placeText;
    }

    public void setPlaceText(String placeText) {
        this.placeText = placeText;
    }

    public int getDirection() {
        return direction;
    }

    public void setDirection(int direction) {
        this.direction = direction;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(String updateDate) {
        this.updateDate = updateDate;
    }

    public int getUnReadCount() {
        return unReadCount;
    }

    public void setUnReadCount(int unReadCount) {
        this.unReadCount = unReadCount;
    }
}
